package com.serviceprovider.business.module.order.model;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.order.valueobjects.OrderFilterConditionVO;
import com.serviceprovider.business.module.order.valueobjects.OrderFilterVO;

//~--- JDK imports ------------------------------------------------------------

import java.util.ArrayList;
import java.util.List;

public class OrderFilter {
    private List<OrderFilterCondition> filterConditionList = new ArrayList<OrderFilterCondition>();
    private Integer                    id;
    private boolean                    isActive;
    private String                     name;

    public OrderFilter() {}

    public OrderFilter(OrderFilterVO orderFilter) {
        this.id       = orderFilter.getId();
        this.name     = orderFilter.getName();
        this.isActive = orderFilter.isActive();
        this.filterConditionList.clear();

        for (OrderFilterConditionVO item : orderFilter.getFilterConditionList()) {
            this.filterConditionList.add(new OrderFilterCondition(item));
        }
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public List<OrderFilterCondition> getFilterConditionList() {
        return filterConditionList;
    }

    public void setFilterConditionList(List<OrderFilterCondition> filterConditionList) {
        this.filterConditionList = filterConditionList;
    }
}



